home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Delphi Magazine Collection 2001
/
Delphi Magazine Collection 20001 (2001).iso
/
DISKS
/
ISSUE17
/
CLINIC
/
LISTING3.PAS
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Pascal/Delphi Source File
|
1996-12-19
|
374 b
|
15 lines
procedure TForm1.FormCreate(Sender: TObject);
var
Index: Integer;
const
TwoDigitYear = 'yy';
FourDigitYear = TwoDigitYear + 'y';
begin
if Pos(FourDigitYear, ShortDateFormat) = 0 then begin
Index := Pos(TwoDigitYear, ShortDateFormat);
if Index <> 0 then
{ Insert an extra letter 'y' }
Insert('y', ShortDateFormat, Index)
end
end;